﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title - 【GSLMS】</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @Html.Partial("Script")
    <script type="text/javascript">
        $(function () {
            DWZ.init("/Content/DWZ/dwz.frag.xml", {
                //loginUrl: "login_dialog.html", loginTitle: "登录", // 弹出登录对话框
                loginUrl: "/login", // 跳到登录页面
                statusCode: { ok: 200, error: 300, timeout: 301 }, //【可选】
                pageInfo: { pageNum: "pageNum", numPerPage: "numPerPage", orderField: "orderField", orderDirection: "orderDirection" }, //【可选】
                debug: false, // 调试模式 【true|false】
                callback: function () {
                    initEnv();
                    $("#themeList").theme({ themeBase: "themes" }); // themeBase 相对于index页面的主题base路径
                    $(function () {
                        //取到页面链接后的#值并打开页面
                        var urlrel = geturlrel();
                        if (urlrel) {
                            var target = $("." + urlrel);
                            if (target) {
                                var $this = target;
                                var title = $this.attr("title") || $this.text();
                                var tabid = $this.attr("rel");
                                var fresh = eval($this.attr("fresh") || "true");
                                var external = eval($this.attr("external") || "false");
                                var url = unescape($this.attr("href")).replaceTmById($(event.target).parents(".unitBox:first"));
                                DWZ.debug(url);
                                if (!url.isFinishedTm()) {
                                    alertMsg.error($this.attr("warn") || DWZ.msg("alertSelectMsg"));
                                    return false;
                                }
                                if (url && tabid) {
                                    navTab.openTab(tabid, url, { title: title, fresh: fresh, external: external });
                                }
                            }
                        }
                    });
                }
            });
        });
        function geturlrel() {
            var tmp = location.href;
            if (location.href.indexOf("#") >= 0) {
                var tmphs = tmp.substr(tmp.lastIndexOf("#"));
                var hash = tmphs ? tmphs : window.location.hash;
                if (hash && hash.length > 0) {
                    hash = hash.substr(1);
                }
                urlrel = hash;
                return hash;
            }
            else
            {return null;}
        }

        function mydialogAjaxDone(json) {
            DWZ.ajaxDone(json);
            if (json.statusCode == DWZ.statusCode.ok) {
                if (json.navTabId) {
                    var GUID = json.navTabId.split(",");
                    var $this = $("[DIVGUID=" + GUID[0] + "]");
                    var options = {};
                    options.currentIndex = GUID[1];
                    options.eventType = $this.attr("eventtype");
                    $this.tabs(options);

                } else if (json.rel) {
                    navTabPageBreak({}, json.rel);
                }

                if ("closeCurrent" == json.callbackType) {
                    setTimeout(function () { navTab.closeCurrentTab(json.navTabId); }, 100);
                } else if ("forward" == json.callbackType) {
                    navTab.reload(json.forwardUrl);
                } else if ("forwardConfirm" == json.callbackType) {
                    alertMsg.confirm(json.confirmMsg || DWZ.msg("forwardConfirmMsg"), {
                        okCall: function () {
                            navTab.reload(json.forwardUrl);
                        },
                        cancelCall: function () {
                            navTab.closeCurrentTab(json.navTabId);
                        }
                    });
                } else {
                    navTab.getCurrentPanel().find(":input[initValue]").each(function () {
                        var initVal = $(this).attr("initValue");
                        $(this).val(initVal);
                    });
                }

            }
        }        
    </script>
    <style type="text/css">
        .img
        {
            filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
        }
        .CreateDiv
        {
            width: 100%;
        }
        .LeftDiv
        {
            width: 49%;
            float: left;
        }
        .rightDiv
        {
            width: 49%;
            float: left;
        }
    </style>
</head>
<body>
    @{
        var CurentUser = Session["CurentUser"] as GSLMS.Entity.DTO.CurrentUserDTO;
    }
    <div id="layout">
        <div id="header">
            <div class="headerNav">
                <a class="logo" href="#">标志</a>
                <ul class="nav">
                    <li><a href="main/SetUp" target="navTab" rel="mainSetUp" fresh="true" title="修改密码(@CurentUser.UserName)">
                        欢迎您，@CurentUser.EmpName</a></li>
                    <li><a href="main/SetUp" target="navTab" rel="mainSetUp" fresh="true" title="修改密码">修改密码</a></li>
                    <li><a href="login/out">退出</a></li>
                </ul>
            </div>
            <!-- navMenu -->
        </div>
        <div id="leftside">
            <div id="sidebar_s">
                <div class="collapse">
                    <div class="toggleCollapse">
                        <div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="sidebar">
                <div class="toggleCollapse">
                    <h2>
                        主菜单</h2>
                    <div>
                        收缩</div>
                </div>
                @RenderSection("Left", required: false)
            </div>
        </div>
        <div id="container">
            <div id="navTab" class="tabsPage">
                <div class="tabsPageHeader">
                    <div class="tabsPageHeaderContent">
                        <!-- 显示左右控制时添加 class="tabsPageHeaderMargin" -->
                        <ul class="navTab-tab">
                            <li tabid="main" class="main"><a href="javascript:;"><span><span class="home_icon">我的主页</span></span></a></li>
                        </ul>
                    </div>
                    <div class="tabsLeft">
                        left</div>
                    <!-- 禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->
                    <div class="tabsRight">
                        right</div>
                    <!-- 禁用只需要添加一个样式 class="tabsRight tabsRightDisabled" -->
                    <div class="tabsMore">
                        more</div>
                </div>
                <ul class="tabsMoreList">
                    <li><a href="javascript:;">我的主页</a></li>
                </ul>
                <div class="navTab-panel tabsPageContent layoutBox">
                    @RenderSection("Main", required: false)
                </div>
            </div>
        </div>
        @RenderBody()
    </div>
    <div id="footer">
        Copyright &copy; 2015.深圳国软科技有限公司 Ver @System.Reflection.Assembly.LoadFrom(Server.MapPath("~/bin/GSLMS.WebAPP.DLL")).GetName().Version.ToString()
    </div>
</body>
</html>
